<template>
  <div class="recommend">
    <div
      v-for="(item, index) in recommends"
      :key="index"
      class="recommend-item"
    >
      <a :href="item.link" class="detail">
        <img :src="item.image" alt="" />
        <div>{{ item.title }}</div>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  name: "RecommendView",
  data() {
    return {};
  },
  props: {
    recommends: {
      type: Array,
      default() {
        return [];
      },
    },
  },
};
</script>

<style scoped>
.recommend {
  width: 100%;
  display: flex;
  flex-direction: row;
  /* margin-bottom: 10px; */
  border-bottom: 8px solid #eee;
  /* padding-bottom: 10px; */
}

.recommend-item {
  width: 25%;
}

.detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: var(---font-size);
  width: 100%;
  padding: 8px 8px;
}

.detail img {
  width: 100%;
}

.detail div {
  margin-top: 8px;
}
</style>
